package com.lg.ws.wsprovider.config;

import com.lg.ws.wsprovider.service.HelloService;
import org.apache.cxf.Bus;
import org.apache.cxf.jaxws.EndpointImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;
import javax.xml.ws.Endpoint;

/**
 * @Author: wltt
 * @Date: 2019/4/11 9:58
 * @Version: 1.0
 * @Description: TODO
 */
@Configuration
public class CxfConfig {

    @Resource
    private Bus bus;

    @Resource
    HelloService helloService;

    @Bean
    public Endpoint endpoint1(){
        EndpointImpl endpoint=new EndpointImpl(bus, helloService);
        endpoint.publish("/HelloService");
        return endpoint;
    }

}
